import React, { Component } from 'react'
import './user.less'
import { makeStyles } from '@material-ui/core/styles';
import Popper from '@material-ui/core/Popper';
import { connect } from "react-redux";
class User extends Component {

  render() {
    return (
      <div>
        <div className="dabox1">
          <div className="da">
            <div className="beij">
              <div className="zx">个人中心</div>
              <div className="touxiang"><img src="../../images/user/option_me.png" alt="" /></div>
            </div>
            <div className="nic">su</div>
            <div className="ull">
              <div className="lii">
                <p className="p1"></p>
                <p>3</p>
                <p>收藏</p>
              </div>
              <div className="lii">
                <p className="p2"></p>
                <p>3</p>
                <p>收藏</p>
              </div>
              <div className="lii">
                <p className="p3"></p>
                <p>3</p>
                <p>收藏</p>
              </div>
              <div className="lii">
                <p className="p4"></p>
                <p>3</p>
                <p>收藏</p>
              </div>
            </div>
          </div>
          <div className="xia">
            <div className="su" onClick={this.props.nullFn}>
              <div className="zuo">
                <span className="s1"></span>
                <span>我的资料</span>
              </div>
              <div className="you">&gt;</div>
            </div>
            <div className="su" onClick={this.props.nullFn}>
              <div className="zuo">
                <span className="s2"></span>
                <span>我的资料</span>
              </div>
              <div className="you">&gt;</div>
            </div>
            <div className="su" onClick={this.props.nullFn}>
              <div className="zuo">
                <span className="s3"></span>
                <span>我的资料</span>
              </div>
              <div className="you">&gt;</div>
            </div>
          </div>

        </div>
      </div>
    )

  }
}


const mapDispatchToProps = (dispatch) => {
  return {
    nullFn() {
      let times = null
      const action = {
        type: "myarertshow"
      }
      dispatch(action)
      clearTimeout(times)
      times = setTimeout(() => {
        dispatch(action)
      }, 1000)


    },

  }
}

export default connect(null, mapDispatchToProps)(User)


